#ifndef ENTITY_H
#define ENTITY_H

#include <SFML/Graphics.hpp>
#include <chipmunk/chipmunk.h>
#include <vector>
#include <string>
#include "Vectors.h"
#include "AnimatedSprite.h"

namespace me
{

    class Entity : public me::AnimatedSprite
    {
        public:
            Entity(me::Vector2f pos, me::Vector2f scale, sf::Texture* texture, sf::Color color = sf::Color(255, 255, 255, 255));
            virtual ~Entity();

            me::Vector2f getWorldPosition();
            virtual cpBody* getBody();
			virtual std::vector<cpShape*> getShapes();
			virtual std::vector<cpConstraint*> getConstraints();

            void setWorldPosition(me::Vector2f pos);
            void moveWorldPosition(me::Vector2f movement);
            virtual void update();
            virtual void addShape(cpShape* shape);
            virtual void addConstraint(cpConstraint* constraint);


        protected:
            me::Vector2f m_world_pos;
        private:
    };

    class PhysicalEntity : public Entity
    {
		public:
			PhysicalEntity(cpBody* body, me::Vector2f pos, me::Vector2f scale, sf::Texture* texture, sf::Color color = sf::Color(255, 255, 255, 255));
			virtual ~PhysicalEntity();

			void setWorldPosition(me::Vector2f pos);
			virtual void update();
			virtual void addShape(cpShape* shape);
			virtual void addConstraint(cpConstraint* constraint);

			virtual cpBody* getBody();
			virtual std::vector<cpShape*> getShapes();
			virtual std::vector<cpConstraint*> getConstraints();


		protected:

			cpBody* m_body;
			std::vector<cpShape*> m_shapes;
			std::vector<cpConstraint*> m_constraints;

		private:

    };

}

#endif // ENTITY_H
